package com.javalab.recorder.audio;

import java.util.HashMap;
import java.util.Map;

public class AudioCache {

	private static AudioCache audioCache;

	private Map<String, Object> cache;

	private AudioCache() {
		cache = new HashMap<String, Object>();
	}

	public static AudioCache getInstance() {
		synchronized(AudioCache.class) {
			if (audioCache == null) {
				audioCache = new AudioCache();
			}
			return audioCache;
		}
	}

	public void put(String key, Object value) {
		cache.put(key, value);
	}

	public Object get(String key) {
		return cache.get(key);
	}

	public boolean containsKey(String key) {
		return cache.containsKey(key);
	}
}
